def pixelcount(img):
    a=img.histogram()
    white=a[0]
    black=a[255]
    return (white,black)

